<!--
 * @Description: 超时调用
 * @Author: rendc
 * @Date: 2021-09-09 09:38:58
 * @LastEditors: rendc
 * @LastEditTime: 2021-09-09 09:45:17
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>超时调用</title>
</head>

<body>

</body>
<script>
  var id = setTimeout(
    function () {
      alert("时间到啦～");
    }, 1000
  )
  // clearTimeout(id);
</script>

</html>